/**
 * @(#) FamilyVO.as
 *
 * @date		2009. 02. 13.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	가족사항  Value Object
 * 				 
 */
package com.skt.common_hr.myprofile.model.vo
{
	import com.wcl.utils.StringUtil;
	
	import mx.formatters.PhoneFormatter;
	
	
	[Bindable]
	public class FamilyVO
	{
		public var KDSVH:String;			// standard 가족관계
		public var KDSVHT:String;			//관계
		public var FNAME:String;			//성명
		public var REGNO:String = "";			//주민등록번호 (한국)
		public var AGE:String;				//나이
		public var LIVID:String;			//동거여부
		public var HNDID:String;			//장애여부
		public var DPTID:String;			//부양가족여부
		public var WTEXT:String;			//근무처명
		public var FASIN:String;			//교육 기관
		public var FAJOB:String;			//가족구성원의 직무
		public var SUBTY:String;			// 
		public var SEQNR:String;			// 
		public var BEGDA:Date;			//시작일
		public var ENDDA:Date;			//종료일
		public var OBJPS:String;			// 

		public var FAMSAT:String;			//관계
		public var ICNUM:String;			//Identity Number(중국)
		public var PCODE:String;			//정치면모
		public var PCODET:String;			//정치면모
		public var TELNR:String;			//
		public var EGATX:String;			//
		
		public var ISFMEDIT:Boolean = true;			//가족관계 수정여부 

		public var selected:Boolean = false; 

		public function getPid(pid:String):String
		{
			var pidNum:PhoneFormatter = new PhoneFormatter;
			pidNum.formatString = "######-#######";
			
			return pidNum.format(pid);
		}
		
		public function get regno1():String
		{
			return StringUtil.trim(REGNO.substr(0, 6));	
		}
		public function set regno1(v:String):void
		{
			var spaces:String = "       ";
			if(v.length<6) {
				v = v + spaces.substr(0, 6-v.length);
			}
			REGNO = v + regno2;
		}
		
		
		public function get regno2():String
		{
			return REGNO.substr(6);	
		}
		public function set regno2(v:String):void
		{
			REGNO= regno1 + v;
		}
		public function get strLIVID():String
		{
			if(LIVID=="X") return "Y";
			else return "N";
		}
	}
}